geodataframe and geoseries

41

import sys
import geopandas as gpd

shp = (sys.argv[1])

gdf = gpd.read_file(shp)

union = gdf.unary_union

env = union.envelope

envgdf = gpd.GeoDataFrame()

envgdf['geometry'] = env
envgdf.geometry.name

print("\nGeoDataFrame :\n", envgdf)

Comments

Submit
0 Comments